
//删除xml配置参数
$('body').on('click',".deleteWebServiceParamsSpanClick",function(){
	deleteWebServiceDriverDataDetail(this);
});

//添加xml配置参数
function addWebServiceDriverDataDetail(page){
	var xmlDataHtml=$('<div class="form-group">'
					+'<div class="col-sm-2"></div>'
					+'<div class="col-sm-4">'
					+'<input class="form-control" maxlength="32" asd-valid="require" type="text" name="filedName">'
					+'</div>'
					+'<div class="col-sm-4">'
					+'<select class="form-control select-control" name="filedTypeName">'
					+'<option value="12">VARCHAR</option>'
					+'<option value="2">NUMERIC</option>'
					+'<option value="4">INTEGER</option>'
					+'<option value="91">DATE</option>'
					+'<option value="93">TIMESTAMP</option>'
					+'<option value="6">FLOAT</option>'
					+'<option value="8">DOUBLE</option>'
					+'<option value="-1">LONGVARCHAR</option>'
					+'</select>'
					+'</div>'
					+'<span class="fa fa-minus fa-2x fastsyncer_pointer col-sm-2 form-control-static deleteWebServiceParamsSpanClick"></span>'
					+'</div>');
	$(page).parents(".driverWebServiceParamsContainer").append(xmlDataHtml);

	//初始化select2插件
	bindEventForSelect2();
}
function bindEventForSelect2(){
	// 初始化select2插件
	$(".select-control").select2({
		width : "100%",
		theme : "classic",
		// Infinity展示的Option个数不限制
		minimumResultsForSearch : Infinity
	});
}

//删除xml配置参数
function deleteWebServiceDriverDataDetail(type){
	$(type).parents('.form-group').remove();
}

$(function() {
	// 兼容IE PlaceHolder
	$('input[type="text"],input[type="password"]').ASDPlaceHolder();
	
	//初始化select2插件
	bindEventForSelect2()
});